<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bluetooth LE Mesh Library: Mesh Light CTL Server</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bluetooth LE Mesh Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__wiced__bt__mesh__light__ctl__server.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Mesh Light CTL Server<div class="ingroups"><a class="el" href="group__wiced__bt__mesh.html">LE Mesh</a> &raquo; <a class="el" href="group__wiced__bt__mesh__models.html">Mesh Models Library API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>The AIROC Mesh Color Temperature Lightness (CTL) Server module provides a way for an application to implement a dimmable light device with color temperature support. </p>
<p>The device can be controlled by setting the brightness, color temperature and delta UV, but also can be can be controlled using a Level slider (Generic Level client) applied to the brightness or color temperature and by a On/Off switch (Generic On/Off client). The device also supports a default transition time server functionality and the application can specify on power up behavior.</p>
<p>The definition of the CTL Server spans two elements. To include the Mesh Models support for the CTL Server model the application includes <a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga31d00ceb59ef7db4fc28879b20509808">WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER</a> and WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER in two consecutive elements in the device definition. If the device supports several lights with CTL Server, for example, a light fixture or a chandelier with several color lights, the pair of <a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga31d00ceb59ef7db4fc28879b20509808">WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER</a> and WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER shall be repeated for each physical device.</p>
<p>In addition to the definition, the application shall initialize the CTL Server module by calling <a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#gaf97da5c28f67d67cb59febbbc09e5798">wiced_bt_mesh_model_light_ctl_server_init</a> function for each primary element where the CTL functionality is required providing the <a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga4a9b2818fca0e0ca075045a4905d0eac">wiced_bt_mesh_light_ctl_server_callback_t</a> callback that will be executed when the brightness level or the color temperature of the device needs to be changed.</p>
<p>If the brightness or color temperature of the device is changed locally the application should call the wiced_bt_mesh_model_light_ctl_status_changed so that the library can maintain correct state and send an appropriate status message if it is configured to do so.</p>
<p>Most of the functionality of the Light CTL server device is implemented in the Mesh Models Library. The application only needs to set hardware appropriately on receiving WICED_BT_MESH_LIGHT_CTL_STATUS event. If client requests to change the brightness or the color temperature to the target value over a period of time, the library will maintain the timer and will periodically call the application with appropriate values.</p>
<p>The default transition time is managed by the Mesh Models library. The application provides factory default in the default_transition_time element of the <a class="el" href="group__wiced__bt__mesh__core.html#ga347805955f2e047fa5a05b5dc6ec939f">wiced_bt_mesh_core_config_t</a> configuration structure. The default value is used unless overwritten by the default transition time client.</p>
<p>The on power up behavior is managed by the Mesh Models library. The application provides factory default in the onpowerup_state element of the <a class="el" href="group__wiced__bt__mesh__core.html#ga347805955f2e047fa5a05b5dc6ec939f">wiced_bt_mesh_core_config_t</a> configuration structure. The default value is used unless overwritten by the default transition time client. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga31d00ceb59ef7db4fc28879b20509808"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga31d00ceb59ef7db4fc28879b20509808">WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER</a></td></tr>
<tr class="memdesc:ga31d00ceb59ef7db4fc28879b20509808"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mesh Light CTL Server Device.  <a href="#ga31d00ceb59ef7db4fc28879b20509808">More...</a><br /></td></tr>
<tr class="separator:ga31d00ceb59ef7db4fc28879b20509808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba4aa31d5495bb53f040bcfba348f286"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER</b></td></tr>
<tr class="separator:gaba4aa31d5495bb53f040bcfba348f286"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga4a9b2818fca0e0ca075045a4905d0eac"><td class="memItemLeft" align="right" valign="top">typedef void()&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga4a9b2818fca0e0ca075045a4905d0eac">wiced_bt_mesh_light_ctl_server_callback_t</a>(uint8_t element_idx, uint16_t event, void *p_data)</td></tr>
<tr class="memdesc:ga4a9b2818fca0e0ca075045a4905d0eac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Server callback.  <a href="#ga4a9b2818fca0e0ca075045a4905d0eac">More...</a><br /></td></tr>
<tr class="separator:ga4a9b2818fca0e0ca075045a4905d0eac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf97da5c28f67d67cb59febbbc09e5798"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#gaf97da5c28f67d67cb59febbbc09e5798">wiced_bt_mesh_model_light_ctl_server_init</a> (uint8_t lightness_element_idx, <a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga4a9b2818fca0e0ca075045a4905d0eac">wiced_bt_mesh_light_ctl_server_callback_t</a> *p_callback, wiced_bool_t is_provisioned)</td></tr>
<tr class="memdesc:gaf97da5c28f67d67cb59febbbc09e5798"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Server Module initialization.  <a href="#gaf97da5c28f67d67cb59febbbc09e5798">More...</a><br /></td></tr>
<tr class="separator:gaf97da5c28f67d67cb59febbbc09e5798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga794cb5d5a4e341379bb70536b8ce41a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga794cb5d5a4e341379bb70536b8ce41a3">wiced_bt_mesh_model_light_ctl_server_state_changed</a> (uint8_t element_idx, <a class="el" href="structwiced__bt__mesh__light__ctl__status__data__t.html">wiced_bt_mesh_light_ctl_status_data_t</a> *p_data)</td></tr>
<tr class="memdesc:ga794cb5d5a4e341379bb70536b8ce41a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL state changed.  <a href="#ga794cb5d5a4e341379bb70536b8ce41a3">More...</a><br /></td></tr>
<tr class="separator:ga794cb5d5a4e341379bb70536b8ce41a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa07a3542b22992e82fc92c23a0b98f16"><td class="memItemLeft" align="right" valign="top">wiced_bool_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#gaa07a3542b22992e82fc92c23a0b98f16">wiced_bt_mesh_model_light_ctl_server_message_handler</a> (<a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *p_event, uint8_t *p_data, uint16_t data_len)</td></tr>
<tr class="memdesc:gaa07a3542b22992e82fc92c23a0b98f16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Server Message Handler.  <a href="#gaa07a3542b22992e82fc92c23a0b98f16">More...</a><br /></td></tr>
<tr class="separator:gaa07a3542b22992e82fc92c23a0b98f16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2924e0c30122408e3bab73c57c9fb4d"><td class="memItemLeft" align="right" valign="top">wiced_bool_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#gaf2924e0c30122408e3bab73c57c9fb4d">wiced_bt_mesh_model_light_ctl_setup_server_message_handler</a> (<a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *p_event, uint8_t *p_data, uint16_t data_len)</td></tr>
<tr class="memdesc:gaf2924e0c30122408e3bab73c57c9fb4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Setup Server Message Handler.  <a href="#gaf2924e0c30122408e3bab73c57c9fb4d">More...</a><br /></td></tr>
<tr class="separator:gaf2924e0c30122408e3bab73c57c9fb4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6a3c44332d8149a9ee922d8007ea8f94"><td class="memItemLeft" align="right" valign="top">wiced_bool_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga6a3c44332d8149a9ee922d8007ea8f94">wiced_bt_mesh_model_light_ctl_temperature_server_message_handler</a> (<a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *p_event, uint8_t *p_data, uint16_t data_len)</td></tr>
<tr class="memdesc:ga6a3c44332d8149a9ee922d8007ea8f94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Temperature Server Message Handler.  <a href="#ga6a3c44332d8149a9ee922d8007ea8f94">More...</a><br /></td></tr>
<tr class="separator:ga6a3c44332d8149a9ee922d8007ea8f94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c86ca7a890ae4fe7f1a97305dfe9b2a"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga7c86ca7a890ae4fe7f1a97305dfe9b2a">wiced_bt_mesh_model_light_ctl_server_scene_store_handler</a> (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len)</td></tr>
<tr class="memdesc:ga7c86ca7a890ae4fe7f1a97305dfe9b2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Server Scene Store Handler.  <a href="#ga7c86ca7a890ae4fe7f1a97305dfe9b2a">More...</a><br /></td></tr>
<tr class="separator:ga7c86ca7a890ae4fe7f1a97305dfe9b2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9367e89a9e8f85413d8c51c24befe048"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga9367e89a9e8f85413d8c51c24befe048">wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler</a> (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len)</td></tr>
<tr class="memdesc:ga9367e89a9e8f85413d8c51c24befe048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Temperature Server Scene Store Handler.  <a href="#ga9367e89a9e8f85413d8c51c24befe048">More...</a><br /></td></tr>
<tr class="separator:ga9367e89a9e8f85413d8c51c24befe048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8437891fae790177dffdcbe22b0e0224"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga8437891fae790177dffdcbe22b0e0224">wiced_bt_mesh_model_light_ctl_server_scene_recall_handler</a> (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len, uint32_t transition_time, uint32_t delay)</td></tr>
<tr class="memdesc:ga8437891fae790177dffdcbe22b0e0224"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light CTL Server Scene Restore Handler.  <a href="#ga8437891fae790177dffdcbe22b0e0224">More...</a><br /></td></tr>
<tr class="separator:ga8437891fae790177dffdcbe22b0e0224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga032070dcfc3da3ffbd03ab8eda0aae7e"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga032070dcfc3da3ffbd03ab8eda0aae7e">wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler</a> (uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len, uint32_t transition_time, uint32_t delay)</td></tr>
<tr class="memdesc:ga032070dcfc3da3ffbd03ab8eda0aae7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Light Temperature Server Scene Restore Handler.  <a href="#ga032070dcfc3da3ffbd03ab8eda0aae7e">More...</a><br /></td></tr>
<tr class="separator:ga032070dcfc3da3ffbd03ab8eda0aae7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf07b7c8c6fc6a7298fe5a24e0a59516"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#gaaf07b7c8c6fc6a7298fe5a24e0a59516">wiced_bt_mesh_model_light_ctl_server_set_startup_controller</a> (uint8_t element_idx, wiced_bool_t startup_controller)</td></tr>
<tr class="memdesc:gaaf07b7c8c6fc6a7298fe5a24e0a59516"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Light CTL Model as a startup controller.  <a href="#gaaf07b7c8c6fc6a7298fe5a24e0a59516">More...</a><br /></td></tr>
<tr class="separator:gaaf07b7c8c6fc6a7298fe5a24e0a59516"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga31d00ceb59ef7db4fc28879b20509808"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga31d00ceb59ef7db4fc28879b20509808">&#9670;&nbsp;</a></span>WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_DEFTT_SRV, <a class="code" href="group__wiced__bt__mesh__default__transition__time__server.html#gaadbba5b7363b2afda149d73b56d0959d">wiced_bt_mesh_model_default_transition_time_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCENE_SRV, <a class="code" href="group__wiced__bt__mesh__scene__server.html#gad02139dbd5de33dbfa4574f1b7524817">wiced_bt_mesh_model_scene_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCENE_SETUP_SRV, <a class="code" href="group__wiced__bt__mesh__scene__server.html#ga1e69d93cd77b795bd811c1ae913a39e9">wiced_bt_mesh_model_scene_setup_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_ONOFF_SRV, <a class="code" href="group__wiced__bt__mesh__onoff__server.html#gae8407b3533ba16b322606715ecc95421">wiced_bt_mesh_model_onoff_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_POWER_ONOFF_SRV, <a class="code" href="group__wiced__bt__mesh__power__onoff__server.html#gaff7b2624880843f3d34cdf348db91348">wiced_bt_mesh_model_power_onoff_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_POWER_ONOFF_SETUP_SRV, <a class="code" href="group__wiced__bt__mesh__power__onoff__server.html#ga6c4dd5a8835747d24d55e38a1b630bfd">wiced_bt_mesh_model_power_onoff_setup_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_LEVEL_SRV, <a class="code" href="group__wiced__bt__mesh__level__server.html#ga54956fe15bf384bcd2cc9da8435c25e2">wiced_bt_mesh_model_level_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SRV, <a class="code" href="group__wiced__bt__mesh__light__lightness__server.html#ga4239007109ce36d64ff99bd73f5e37f0">wiced_bt_mesh_model_light_lightness_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV,  <a class="code" href="group__wiced__bt__mesh__light__lightness__server.html#ga457be8e99b3df7a5da4c37e2217e7f9f">wiced_bt_mesh_model_light_lightness_setup_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_CTL_SRV, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#gaa07a3542b22992e82fc92c23a0b98f16">wiced_bt_mesh_model_light_ctl_server_message_handler</a>, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#ga7c86ca7a890ae4fe7f1a97305dfe9b2a">wiced_bt_mesh_model_light_ctl_server_scene_store_handler</a>, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#ga8437891fae790177dffdcbe22b0e0224">wiced_bt_mesh_model_light_ctl_server_scene_recall_handler</a> }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_CTL_SETUP_SRV, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#gaf2924e0c30122408e3bab73c57c9fb4d">wiced_bt_mesh_model_light_ctl_setup_server_message_handler</a>, NULL, NULL  }</div><div class="ttc" id="group__wiced__bt__mesh__power__onoff__server_html_ga6c4dd5a8835747d24d55e38a1b630bfd"><div class="ttname"><a href="group__wiced__bt__mesh__power__onoff__server.html#ga6c4dd5a8835747d24d55e38a1b630bfd">wiced_bt_mesh_model_power_onoff_setup_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_power_onoff_setup_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Power On/Off Setup Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__lightness__server_html_ga4239007109ce36d64ff99bd73f5e37f0"><div class="ttname"><a href="group__wiced__bt__mesh__light__lightness__server.html#ga4239007109ce36d64ff99bd73f5e37f0">wiced_bt_mesh_model_light_lightness_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_light_lightness_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Light Lightness Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__default__transition__time__server_html_gaadbba5b7363b2afda149d73b56d0959d"><div class="ttname"><a href="group__wiced__bt__mesh__default__transition__time__server.html#gaadbba5b7363b2afda149d73b56d0959d">wiced_bt_mesh_model_default_transition_time_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_default_transition_time_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Default Transition Time Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__lightness__server_html_ga457be8e99b3df7a5da4c37e2217e7f9f"><div class="ttname"><a href="group__wiced__bt__mesh__light__lightness__server.html#ga457be8e99b3df7a5da4c37e2217e7f9f">wiced_bt_mesh_model_light_lightness_setup_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_light_lightness_setup_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Light Lightness Setup Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__scene__server_html_ga1e69d93cd77b795bd811c1ae913a39e9"><div class="ttname"><a href="group__wiced__bt__mesh__scene__server.html#ga1e69d93cd77b795bd811c1ae913a39e9">wiced_bt_mesh_model_scene_setup_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_scene_setup_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Scene Setup Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_gaf2924e0c30122408e3bab73c57c9fb4d"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#gaf2924e0c30122408e3bab73c57c9fb4d">wiced_bt_mesh_model_light_ctl_setup_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_light_ctl_setup_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Light CTL Setup Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__onoff__server_html_gae8407b3533ba16b322606715ecc95421"><div class="ttname"><a href="group__wiced__bt__mesh__onoff__server.html#gae8407b3533ba16b322606715ecc95421">wiced_bt_mesh_model_onoff_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_onoff_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">On/Off Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_gaa07a3542b22992e82fc92c23a0b98f16"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#gaa07a3542b22992e82fc92c23a0b98f16">wiced_bt_mesh_model_light_ctl_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_light_ctl_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Light CTL Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_ga8437891fae790177dffdcbe22b0e0224"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#ga8437891fae790177dffdcbe22b0e0224">wiced_bt_mesh_model_light_ctl_server_scene_recall_handler</a></div><div class="ttdeci">uint16_t wiced_bt_mesh_model_light_ctl_server_scene_recall_handler(uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len, uint32_t transition_time, uint32_t delay)</div><div class="ttdoc">Light CTL Server Scene Restore Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__scene__server_html_gad02139dbd5de33dbfa4574f1b7524817"><div class="ttname"><a href="group__wiced__bt__mesh__scene__server.html#gad02139dbd5de33dbfa4574f1b7524817">wiced_bt_mesh_model_scene_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_scene_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Scene Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__level__server_html_ga54956fe15bf384bcd2cc9da8435c25e2"><div class="ttname"><a href="group__wiced__bt__mesh__level__server.html#ga54956fe15bf384bcd2cc9da8435c25e2">wiced_bt_mesh_model_level_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_level_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Level Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__power__onoff__server_html_gaff7b2624880843f3d34cdf348db91348"><div class="ttname"><a href="group__wiced__bt__mesh__power__onoff__server.html#gaff7b2624880843f3d34cdf348db91348">wiced_bt_mesh_model_power_onoff_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_power_onoff_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Power On/Off Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_ga7c86ca7a890ae4fe7f1a97305dfe9b2a"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#ga7c86ca7a890ae4fe7f1a97305dfe9b2a">wiced_bt_mesh_model_light_ctl_server_scene_store_handler</a></div><div class="ttdeci">uint16_t wiced_bt_mesh_model_light_ctl_server_scene_store_handler(uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len)</div><div class="ttdoc">Light CTL Server Scene Store Handler.</div></div>
</div><!-- fragment -->
<p>Mesh Light CTL Server Device. </p>
<p>The device implements all required models for the two elements of a color bulb that supports brightness and color temperature control. The WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER should be defined in the element with the higher index than one with WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER, but before the next primary element of the device. For example, if application supports two CTL lights, the consecutive elements should be WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER, WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER, WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER, WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER. The time and scheduler models are optional and can be commented out to reduce memory footprint. </p>

</div>
</div>
<a id="gaba4aa31d5495bb53f040bcfba348f286"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaba4aa31d5495bb53f040bcfba348f286">&#9670;&nbsp;</a></span>WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WICED_BT_MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_LEVEL_SRV, <a class="code" href="group__wiced__bt__mesh__level__server.html#ga54956fe15bf384bcd2cc9da8435c25e2">wiced_bt_mesh_model_level_server_message_handler</a>, NULL, NULL }, \</div><div class="line">    { MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_CTL_TEMPERATURE_SRV, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#ga6a3c44332d8149a9ee922d8007ea8f94">wiced_bt_mesh_model_light_ctl_temperature_server_message_handler</a>, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#ga9367e89a9e8f85413d8c51c24befe048">wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler</a>, <a class="code" href="group__wiced__bt__mesh__light__ctl__server.html#ga032070dcfc3da3ffbd03ab8eda0aae7e">wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler</a> }</div><div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_ga6a3c44332d8149a9ee922d8007ea8f94"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#ga6a3c44332d8149a9ee922d8007ea8f94">wiced_bt_mesh_model_light_ctl_temperature_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_light_ctl_temperature_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Light CTL Temperature Server Message Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_ga9367e89a9e8f85413d8c51c24befe048"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#ga9367e89a9e8f85413d8c51c24befe048">wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler</a></div><div class="ttdeci">uint16_t wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler(uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len)</div><div class="ttdoc">Light CTL Temperature Server Scene Store Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__light__ctl__server_html_ga032070dcfc3da3ffbd03ab8eda0aae7e"><div class="ttname"><a href="group__wiced__bt__mesh__light__ctl__server.html#ga032070dcfc3da3ffbd03ab8eda0aae7e">wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler</a></div><div class="ttdeci">uint16_t wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler(uint8_t element_idx, uint8_t *p_buffer, uint16_t buffer_len, uint32_t transition_time, uint32_t delay)</div><div class="ttdoc">Light Temperature Server Scene Restore Handler.</div></div>
<div class="ttc" id="group__wiced__bt__mesh__level__server_html_ga54956fe15bf384bcd2cc9da8435c25e2"><div class="ttname"><a href="group__wiced__bt__mesh__level__server.html#ga54956fe15bf384bcd2cc9da8435c25e2">wiced_bt_mesh_model_level_server_message_handler</a></div><div class="ttdeci">wiced_bool_t wiced_bt_mesh_model_level_server_message_handler(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint16_t data_len)</div><div class="ttdoc">Level Server Message Handler.</div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga4a9b2818fca0e0ca075045a4905d0eac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4a9b2818fca0e0ca075045a4905d0eac">&#9670;&nbsp;</a></span>wiced_bt_mesh_light_ctl_server_callback_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void() wiced_bt_mesh_light_ctl_server_callback_t(uint8_t element_idx, uint16_t event, void *p_data)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Server callback. </p>
<p>Light CTL Server callback is executed by the Mesh Models library when the application is required to adjust the amount of light emitted by the device or its color. The application is responsible for setting the hardware (for example, by controlling PWM) to comply with the values requested by the library.</p>
<p>If peer device requested to transition to the new brightness level over a period of time, the callback will be executed repeatedly. The Mesh Models Library calculates the present lightness level, color temperature and delta UV and submits to the application to setup the hardware.</p>
<p>The p_data parameter points to the <a class="el" href="structwiced__bt__mesh__light__ctl__status__data__t.html">wiced_bt_mesh_light_ctl_status_data_t</a> structure. Typically the application will only need to use the value of the present lightness, temperature and delta_uv fields which specify the target values that the device shall be set at present time. If the remaining_time field is not zero, the transition to the new target level is in progress and the Mesh Models Library will execute the callback at least once more before the transition is completed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element Index of the model </td></tr>
    <tr><td class="paramname">event</td><td>The only event that the application should process is WICED_BT_MESH_LIGHT_CTL_STATUS </td></tr>
    <tr><td class="paramname">p_data</td><td>Pointer to the <a class="el" href="structwiced__bt__mesh__light__ctl__status__data__t.html">wiced_bt_mesh_light_ctl_status_data_t</a> structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf97da5c28f67d67cb59febbbc09e5798"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf97da5c28f67d67cb59febbbc09e5798">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wiced_bt_mesh_model_light_ctl_server_init </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>lightness_element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__wiced__bt__mesh__light__ctl__server.html#ga4a9b2818fca0e0ca075045a4905d0eac">wiced_bt_mesh_light_ctl_server_callback_t</a> *&#160;</td>
          <td class="paramname"><em>p_callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wiced_bool_t&#160;</td>
          <td class="paramname"><em>is_provisioned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Server Module initialization. </p>
<p>A Mesh application which contains Light CTL Server (for example, a dimmable bulb with color temperature control) should call this function during application initialization. The CTL functionality is split into two elements, the lightness and the color temperature. The initialization function should use the index of the primary - lightness element. If the application needs to support multiple CTL lights (for example, a light fixture or a chandelier), the function shall be called multiple times, once per each primary element.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lightness_element_idx</td><td>Element index where lightness part of the CTL is located </td></tr>
    <tr><td class="paramname">p_callback</td><td>Application callback that will be executed to set device hardware to required brightness, color temperature, delta UV values. </td></tr>
    <tr><td class="paramname">is_provisioned</td><td>If TRUE, the application is being restarted after being provisioned or after a power loss. If FALSE the model cleans up NVRAM on startup.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WICED_TRUE if initialization was successful </dd></dl>

</div>
</div>
<a id="ga794cb5d5a4e341379bb70536b8ce41a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga794cb5d5a4e341379bb70536b8ce41a3">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_state_changed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wiced_bt_mesh_model_light_ctl_server_state_changed </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwiced__bt__mesh__light__ctl__status__data__t.html">wiced_bt_mesh_light_ctl_status_data_t</a> *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL state changed. </p>
<p>The application shall call the Light CTL state changed function to notify the Mesh Models library when values brightness, color temperature or delta UV are changed internally.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element index for which scene information is being recalled </td></tr>
    <tr><td class="paramname">p_data</td><td>Pointer to the <a class="el" href="structwiced__bt__mesh__light__ctl__status__data__t.html">wiced_bt_mesh_light_ctl_status_data_t</a> status data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gaa07a3542b22992e82fc92c23a0b98f16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa07a3542b22992e82fc92c23a0b98f16">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_message_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wiced_bool_t wiced_bt_mesh_model_light_ctl_server_message_handler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *&#160;</td>
          <td class="paramname"><em>p_event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Server Message Handler. </p>
<p>The Light CTL Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. The Mesh Core library calls this function for each message received. The function shall return WICED_TRUE if the message is destined for this specific model and successfully processed, and returns WICED_FALSE otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_event</td><td>Mesh event with information about received message. </td></tr>
    <tr><td class="paramname">p_data</td><td>Pointer to the data portion of the message </td></tr>
    <tr><td class="paramname">data_len</td><td>Length of the data in the message</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise. </dd></dl>

</div>
</div>
<a id="gaf2924e0c30122408e3bab73c57c9fb4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf2924e0c30122408e3bab73c57c9fb4d">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_setup_server_message_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wiced_bool_t wiced_bt_mesh_model_light_ctl_setup_server_message_handler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *&#160;</td>
          <td class="paramname"><em>p_event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Setup Server Message Handler. </p>
<p>The Light CTL Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. The Mesh Core library calls this function for each message received. The function shall return WICED_TRUE if the message is destined for this specific model and successfully processed, and returns WICED_FALSE otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_event</td><td>Mesh event with information about received message. </td></tr>
    <tr><td class="paramname">p_data</td><td>Pointer to the data portion of the message </td></tr>
    <tr><td class="paramname">data_len</td><td>Length of the data in the message</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise. </dd></dl>

</div>
</div>
<a id="ga6a3c44332d8149a9ee922d8007ea8f94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6a3c44332d8149a9ee922d8007ea8f94">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_temperature_server_message_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wiced_bool_t wiced_bt_mesh_model_light_ctl_temperature_server_message_handler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwiced__bt__mesh__event__t.html">wiced_bt_mesh_event_t</a> *&#160;</td>
          <td class="paramname"><em>p_event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Temperature Server Message Handler. </p>
<p>The Light CTL Temperature Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. The Mesh Core library calls this function for each message received. The function shall return WICED_TRUE if the message is destined for this specific model and successfully processed, and returns WICED_FALSE otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_event</td><td>Mesh event with information about received message. </td></tr>
    <tr><td class="paramname">p_data</td><td>Pointer to the data portion of the message </td></tr>
    <tr><td class="paramname">data_len</td><td>Length of the data in the message</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise. </dd></dl>

</div>
</div>
<a id="ga7c86ca7a890ae4fe7f1a97305dfe9b2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7c86ca7a890ae4fe7f1a97305dfe9b2a">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_scene_store_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t wiced_bt_mesh_model_light_ctl_server_scene_store_handler </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>buffer_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Server Scene Store Handler. </p>
<p>The Light CTL Scene Store Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. The mesh Scene Server calls this function so that the module can store required data for the scene.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element index for which scene information is being stored </td></tr>
    <tr><td class="paramname">p_buffer</td><td>Pointer to a buffer where data should be stored </td></tr>
    <tr><td class="paramname">buf_size</td><td>Maximum amount of data a model can store</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes the model wrote into the provided buffer </dd></dl>

</div>
</div>
<a id="ga9367e89a9e8f85413d8c51c24befe048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9367e89a9e8f85413d8c51c24befe048">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t wiced_bt_mesh_model_light_ctl_temperature_server_scene_store_handler </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>buffer_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Temperature Server Scene Store Handler. </p>
<p>The Light CTL Scene Store Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. The mesh Scene Server calls this function so that the module can store required data for the scene. Note that if Scene Server is not present on CTL Temperature Server, this function will be called by the internally by the CTL Server</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element index for which scene information is being stored </td></tr>
    <tr><td class="paramname">p_buffer</td><td>Pointer to a buffer where data should be stored </td></tr>
    <tr><td class="paramname">buf_size</td><td>Maximum amount of data a model can store</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes the model wrote into the provided buffer </dd></dl>

</div>
</div>
<a id="ga8437891fae790177dffdcbe22b0e0224"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8437891fae790177dffdcbe22b0e0224">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_scene_recall_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t wiced_bt_mesh_model_light_ctl_server_scene_recall_handler </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>buffer_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>transition_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>delay</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light CTL Server Scene Restore Handler. </p>
<p>The Light CTL Scene Restore Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. When Scene Server receives Scene Recall message it calls this function with data previously stored in the NVRAM.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element index for which scene information is being recalled </td></tr>
    <tr><td class="paramname">p_buffer</td><td>Pointer to a buffer where model's data is located </td></tr>
    <tr><td class="paramname">buf_size</td><td>Maximum amount of data a model can get from the buffer </td></tr>
    <tr><td class="paramname">transition_time</td><td>Specified time in milliseconds to transition to the target state </td></tr>
    <tr><td class="paramname">delay</td><td>Specifies time in milliseconds before starting to transition to the target state</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes the model read from the provided buffer </dd></dl>

</div>
</div>
<a id="ga032070dcfc3da3ffbd03ab8eda0aae7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga032070dcfc3da3ffbd03ab8eda0aae7e">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t wiced_bt_mesh_model_light_ctl_temperature_server_scene_recall_handler </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>buffer_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>transition_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>delay</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Light Temperature Server Scene Restore Handler. </p>
<p>The Light Temperature Scene Restore Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. When Scene Server receives Scene Recall message it calls this function with data previously stored in the NVRAM. Note that if SCENE_SERVER is not implemented on the Light Temperature element, this function will be call internally by the parent Light Ctl Server</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>Element index for which scene information is being recalled </td></tr>
    <tr><td class="paramname">p_buffer</td><td>Pointer to a buffer where model's data is located </td></tr>
    <tr><td class="paramname">buf_size</td><td>Maximum amount of data a model can get from the buffer </td></tr>
    <tr><td class="paramname">transition_time</td><td>Specified time in milliseconds to transition to the target state </td></tr>
    <tr><td class="paramname">delay</td><td>Specifies time in milliseconds before starting to transition to the target state</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes the model read from the provided buffer </dd></dl>

</div>
</div>
<a id="gaaf07b7c8c6fc6a7298fe5a24e0a59516"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaf07b7c8c6fc6a7298fe5a24e0a59516">&#9670;&nbsp;</a></span>wiced_bt_mesh_model_light_ctl_server_set_startup_controller()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wiced_bt_mesh_model_light_ctl_server_set_startup_controller </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>element_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wiced_bool_t&#160;</td>
          <td class="paramname"><em>startup_controller</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Light CTL Model as a startup controller. </p>
<p>The Light CTL Scene Restore Server Message Handler is an internal Mesh Models library function and does not need to be implemented or called by the application, unless application wants to replace the library functionality. For multi-model applications, for example, when application supports both HSL and CTL controls, only one can be setup as a startup controller. If the controller mode is set, the library will execute the power on requirements, for example it can set the temperature, lightness based on the last set state. If the model is not set as a controller, it will not execute on power up state.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element_idx</td><td>The element index of the top level model </td></tr>
    <tr><td class="paramname">startup_controller</td><td>If set to WICED_TRUE, the model will execute On Power Up operation</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Bluetooth LE Mesh Library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
</body>
</html>
